﻿<!DOCTYPE html>
<html>
<head>
    <title>入组管理</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <!--bootStrop css 单选框样式-->
    <link rel="stylesheet" href="resources/scripts/assets/bootstrap/css/icheck-bootstrap.css">
    <!--bootStrop css 主样式-->
    <link rel="stylesheet" href="resources/scripts/assets/bootstrap/css/bootstrap.min.css">
    <!--自定义css-->
    <link rel="stylesheet" href="files/入组管理/styles.css">
    <!--jquery js-->
    <script src="resources/scripts/assets/js/jquery-2.2.3.min.js"></script>
    <!--bootStrop js-->
    <script src="resources/scripts/assets/bootstrap/js/bootstrap.min.js"></script>
    <!--自定义js-->
    <script src="files/入组管理/data.js"></script>
    <script>
        $(function () {
            $("#check").load("多选框属性.html");
            $("#kongjian").load("公共控件树.html", function () {
                $("#sidebar-nav").css({"top": "173px", "left": "247px"});
            });
            //获取页面的每个按钮
            var btns = $(".btn_active");
            //获取内容盒子
            var contents = $(".content");
            //遍历每个按钮为其添加点击事件
            for (var i = 0; i < btns.length; i++) {
                btns[i].index = i;
                btns[i].onclick = function () {
                    //对当前点击的按钮赋予active类名及显示当前按钮对应的内容
                    for (var j = 0; j < btns.length; j++) {
                        btns[j].className = btns[j].className.replace(' active', '').trim();
                        contents[j].className = contents[j].className.replace(' show', '').trim();
                    }
                    this.className = this.className + ' active';
                    contents[this.index].className = contents[this.index].className + ' show';
                };
            }
        });

        //查询科室
        selectAjaxs("FollowUpGroup/SelectByResponsibleDepartment", "keshi1");
        selectAjaxs("FollowUpGroup/SelectByResponsibleDepartment", "keshi2");

        function selectAjaxs(url, attribute) {
            $.ajax({
                url: "http://localhost:8989/hospital/" + url,
                type: "post",
                dataType: "json",
                success: function (data) {
                    for (let dataKey in data) {
                        if (attribute == "keshi1" && data[dataKey].responsibleDepartment != undefined) {
                            let datas = data[dataKey].responsibleDepartment;
                            console.log(datas);
                            $("#" + attribute).append('<option class="department" value=' + datas + '>' + datas + '</option>');
                        }
                        if (attribute == "keshi2" && data[dataKey].responsibleDepartment != undefined) {
                            let datas = data[dataKey].responsibleDepartment;
                            console.log(datas);
                            $("#" + attribute).append('<option class="department" value=' + datas + '>' + datas + '</option>');
                        }
                    }
                }
            });
        }
    </script>
</head>
<body class="edit">
<div>
    <div class="pull-left col-md-offset-0 "
         style="position:absolute;left:40px;top:26px;width:100px;height:20px;font-size:12px;text-decoration:underline;color:#0000CC;">
        <span style="color: #FF6600" class="glyphicon glyphicon-log-in"></span>
        <a href="单个随访组管理.html">
            <ins>返回随访组</ins>
        </a>
    </div>
    <div class="col-md-offset-2 form-inline" style="position:absolute;top:18px;">
        <input type="button" class="btn_active btn-info btn" value="入组范围">
        &nbsp;&nbsp;&nbsp;&nbsp;
        <input type="button" class="btn_active  btn-info btn" value="入组时间">
    </div>
    <br/>
</div>
<h6 class="page-header"></h6>
<div class="col-lg-9">
    <div class="col-lg-2">
        <br/><br/><br/>
        <div class="col-lg-offset-1">
            <input type="button" class="btn_active btn-info btn" value="按科室" style="width: 90%;"><br/><br/>
            <input type="button" class="btn_active btn-info btn" value="按病种" style="width: 90%;"><br/><br/>
            <input type="button" class="btn_active btn-info btn" value="按人员" style="width: 90%;"><br/><br/>
            <input type="button" class="btn_active btn-info btn" value="自定义条件" style="width: 90%;"><br/><br/>
            <input type="button" class="btn_active btn-info btn" value="按结果集" style="width: 90%;"><br/>
        </div>
    </div>
    <div id="check" style="margin-left: 235px"></div>
    <div class="content show">
        <div class="col-lg-1">
            <img class="img " src="images/随访规则设定/u789.png">
        </div>
        <div class="col-lg-9" id="icheck">
            <br/><br/><br/><br/><br/>
            <div class="col-lg-offset-6 form-inline">
                &nbsp;&nbsp;&nbsp;
                <label style="color: #0e90d2">科室:&nbsp;</label>
                <select class="form-control" id="keshi1">
                    <option>请选择</option>
                </select>
            </div>
            <br/><br/><br/><br/><br/><br/><br/><br/>
            <div class="col-lg-offset-7">
                <input type="button" class="btn btn-info" value="保存" style="width: 25%;"><br/>
            </div>
        </div>
    </div>

    <div class="content">
        <div class="col-lg-1">
            <img class="img " src="images/随访规则设定/u789.png">
        </div>
        <form>
            <div class="col-lg-2 text-center">
                基准条件:
                <br/><br/>
                <div class="icheck-info">
                    <input type="checkbox" id="someCheckboxId3"/>
                    <label for="someCheckboxId3">门诊</label>
                </div>

                <div class="icheck-info">
                    <input type="checkbox" id="someCheckboxId4"/>
                    <label for="someCheckboxId4">入院</label>
                </div>

                <div class="icheck-info">
                    <input type="checkbox" id="someCheckboxId5"/>
                    <label for="someCheckboxId5">出院</label>
                </div>

                <div class="icheck-info">
                    <input type="checkbox" id="someCheckboxId6"/>
                    <label for="someCheckboxId6">手术</label>
                </div>

                <div class="icheck-info">
                    &nbsp;<input type="checkbox" id="someCheckboxId7"/>
                    <label for="someCheckboxId7">入ICU</label>
                </div>

                <div class="icheck-info">
                    &nbsp;<input type="checkbox" id="someCheckboxId8"/>
                    <label for="someCheckboxId8">出ICU</label>
                </div>

            </div>
            <div class="col-lg-3">
                筛选条件:
                <br/><br/>
                <div class="icheck-info">
                    <input type="checkbox" id="someCheckboxId9"/>
                    <label for="someCheckboxId9">本院</label>
                </div>

                <div class="icheck-info">
                    <input type="checkbox" id="someCheckboxId10"/>
                    <label for="someCheckboxId10">本科室</label>
                </div>

                <div class="icheck-info">
                    <input type="checkbox" id="someCheckboxId11"/>
                    <label for="someCheckboxId11">首次</label>
                </div>

                <div class="icheck-info">
                    <input type="checkbox" id="someCheckboxId12"/>
                    <label for="someCheckboxId12">末次</label>
                </div>

                <div class="icheck-info">
                    <input type="checkbox" id="someCheckboxId13"/>
                    <label for="someCheckboxId13">本就诊</label>
                </div>

                <div class="icheck-info">
                    <input type="checkbox" id="someCheckboxId14"/>
                    <label for="someCheckboxId14">任意就诊</label>
                </div>
            </div>
            <div class="col-lg-4">
                起始时间:
                <br/><br/>
                <input type="date" class="form-control"><br/>
            </div>
        </form>
    </div>

    <div class="content">
        <div class="col-lg-1">
            <img class="img " src="images/随访规则设定/u789.png">
        </div>
        <form>
            <div class="col-lg-9 form-inline">
                <br/><br/><br/><br/><br/>
                <div class="col-lg-offset-6 form-inline">
                    &nbsp;&nbsp;&nbsp;&nbsp;<label style="color: #0e90d2">科室:&nbsp;</label>
                    <select class="form-control" id="keshi2">
                        <option>请选择</option>
                    </select>
                </div>
                <br/><br/><br/><br/><br/><br/><br/><br/>
                <div class="col-lg-offset-7">
                    <input type="button" class="btn btn-info" value="保存" style="width: 25%;"><br/>
                </div>
            </div>
        </form>
    </div>

    <div class="content">
        <div class="col-lg-1">
            <img class="img " src="images/随访规则设定/u789.png">
        </div>
        <form>
            <div class="col-lg-9 form-inline">
                <br/><br/><br/><br/>
                <label style="color: #0e90d2">疾病编码:</label>
                <input type="text" class="form-control"> ~ <input type="text" class="form-control">
                <br/><br/>
                <label style="color: #0e90d2">疾病名称:</label>
                <input type="text" class="form-control">
                <br/><br/><br/><br/><br/><br/><br/>
                <div class="col-lg-offset-7">
                    <input type="button" class="btn btn-info" value="保存" style="width: 25%;">
                </div>
            </div>
        </form>
    </div>

    <div class="content">
        <div class="col-lg-1">
            <img class="img " src="images/随访规则设定/u789.png">
        </div>
        <form>
            <div class="col-lg-9 form-inline">
                <br/><br/>
                <div class="col-lg-6">
                    &emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;
                    <label style="color: #0e90d2">医生:&nbsp;</label>
                    <select class="form-control">
                        <option>请选择</option>
                        <option>医生1</option>
                        <option>医生2</option>
                    </select>
                </div>
                <div class="col-lg-6 text-right">
                    <label style="color: #0e90d2">护士:&nbsp;</label>
                    <select class="form-control ">
                        <option>请选择</option>
                        <option>护士1</option>
                        <option>护士2</option>
                    </select>
                </div>
                <br/><br/><br/><br/><br/><br/><br/><br/>
                <div class="col-lg-6">
                    &emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;
                    <label style="color: #0e90d2">技师:&nbsp;</label>
                    <select class="form-control">
                        <option>请选择</option>
                        <option>技师1</option>
                        <option>技师2</option>
                    </select></div>
                <div class="col-lg-6 text-right">
                    <label style="color: #0e90d2">药师:&nbsp;</label>
                    <select class="form-control">
                        <option>请选择</option>
                        <option>药师1</option>
                        <option>药师2</option>
                    </select>
                </div>
                <br/><br/><br/><br/><br/><br/><br/>
                <div class="col-lg-offset-7">
                    <input type="button" class="btn btn-info" value="保存" style="width: 25%;">
                </div>
            </div>
        </form>
    </div>

    <div class="content">
        <div class="col-lg-1">
            <img class="img " src="images/随访规则设定/u789.png">
        </div>
        <form>
            <div class="col-lg-9 form-inline">
                <div class="col-lg-5">
                    <div id="kongjian"></div>
                </div>
                <div class="col-lg-offset-8">
                    <input type="button" data-target="#downloadModal" rel="/build/downloadModal" role="button"
                           data-toggle="modal" class="btn btn-info" value="保存">
                    <input type="button" class="btn btn-info" href="#clear" id="clear" value="清空">
                    <input type="button" class="btn btn-info" href="#undo" id="undo" value="撤销">
                    <input type="button" class="btn btn-info" href="#redo" id="redo" value="还原">
                </div>
                <br/>
                <!--编辑框-->
                <div style="min-height:auto;margin-top: auto;top:0px;width: 850px;margin-left:197px"
                     class="demo ui-sortable">
                </div>
            </div>
        </form>
    </div>

    <div class="content">
        <div class="col-lg-1">
            <img class="img " src="images/随访规则设定/u789.png">
        </div>
        <form>
            <div class="col-lg-9 form-inline">
                <div class="check"></div>
                <br/><br/>
                <input type="button" class="btn btn-warning" value="选择结果集">
                &nbsp;&nbsp;查询条件1:名称等于糖尿病
                <br/><br/><br/><br/><br/><br/><br/>
                <div class="col-lg-offset-7">
                    <input type="button" class="btn btn-info" value="保存" style="width: 25%;"><br/>
                </div>
            </div>
        </form>
    </div>
</div>
<!--富文本编辑-->
<div id="editorModal" class="modal fade bs-example-modal-sm" role="dialog" style="display: none;">
    <div class="modal-dialog" role="document" style="width: 56%;">
        <div class="modal-content">
            <div class="modal-header">
                <a class="close" data-dismiss="modal">×</a>
                <h3>编辑</h3>
            </div>
            <div class="modal-body">
                <p>
                    <textarea id="contenteditor"></textarea>
                </p>
            </div>
            <div class="modal-footer">
                <a id="savecontent" class="btn btn-primary" data-dismiss="modal">保存</a>
                <a class="btn" data-dismiss="modal">关闭</a>
            </div>
        </div>
    </div>
</div>
<!--结束-->
<!--保存按钮-->
<div id="downloadModal" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog"
     aria-labelledby="myLargeModalLabel">
    <div class="modal-dialog" role="document" style="width: 56%;">
        <div class="modal-content">
            <div class="modal-header">
                <a class="close" data-dismiss="modal">×</a>
                <h3>保存</h3>
                <div class="modal-body">
                    <p>已在下面生成干净的HTML, 可以下载代码到你的项目.</p>
                    <div class="btn-group">
                        <button type="button" id="fluidPage" class="active btn btn-info"><i
                                class="icon-fullscreen icon-white"></i>
                            自适应宽度
                        </button>
                    </div>
                    <div class="btn-group">
                        <button type="button" class="btn btn-info" id="fixedPage"><i
                                class="icon-screenshot icon-white"></i>
                            固定宽度
                        </button>
                    </div>
                    <br>
                    <br>
                    <p>
                        <textarea></textarea>
                    </p>
                </div>
                <div class="modal-footer">
                    <a class="btn btn-info" onclick="saveHtml()">下载</a>
                    <a class="btn btn-default" data-dismiss="modal">关闭</a>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
